<script setup>
import { ref } from "vue";

const msg = ref('我是子组件')
const showAlert = () => {
  alert('666, 侬好呀, 雷好呀')
}

defineExpose({
  msg,
  showAlert
})
</script>

<template>
  <div>测试组件</div>
  <div>{{ msg }}</div>
</template>

<style scoped></style>